

import 'package:my_flutter/store/LoginData.dart';
import 'package:my_flutter/http/DioEx.dart';
import 'package:my_flutter/http/DioManager.dart';

class ApiPost{
  ///登录
  static Future loginPost(Map<String, dynamic> params) async {
    var resp = await DioManager.getInstance().post('user/login', params: params);
    if(resp is RespData) {
      //处理错误
      return  LoginData.fromDioError(resp);
    }
    //处理成功
    return LoginData.fromJson(resp);
  }
}
